package com.example.practical_training_projects.service;

import com.example.practical_training_projects.entity.test;
import com.example.practical_training_projects.entity.testselect;
import com.example.practical_training_projects.mapper.testselectMapper;
import com.example.practical_training_projects.vo.votestclass;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class testselectServicelmpl implements testselectService{

    @Autowired
    private testselectMapper mapper;
    @Override
    public List<testselect> getAllclass() {
        return mapper.getAllclass() ;
    }

    @Override
    public PageInfo<testselect> findtestselectpage(Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum,pageSize);
        List<testselect> lists=mapper.getAllclass();
        PageInfo<testselect> pageInfo=new PageInfo<>(lists);
        return pageInfo;
    }

    @Override
    public testselect findTestclass(String ts_class) {
        return mapper.findTestclass(ts_class);
    }

    @Override
    public Integer insertClass(testselect ts_class) {
        return mapper.insertClass(ts_class);
    }

    @Override
    public List<testselect> gettestselectClass(String ts_class) {
        return mapper.gettestselectClass(ts_class);
    }

    @Override
    public Integer updateClass(testselect testselect1) {
        return mapper.updateClass(testselect1);
    }


}
